<?php 
	switch($_GET['mod']){
		case "main":
			include 'config.php';
			echo '<div class="body">
					<div style=" width:73%;" class="main_list f-l">
					<div class="beTitle"><strong>最近收藏的视频</strong></div>
					<ul>
					'.favorite().
						'
					</ul>
					</div>
				<div class="f-r w-b-25">
					<div class="mini-box">
					<div class="t">个人信息统计</div>
					<ul>
					<li><span class="at">积分：</span><span class="data">'.uc_user_getcredit(2, 1, '').'</span></li>
					<li><span class="at">经验值：</span><span class="data">0</span></li>
					<li><span class="at">资源币：</span><span class="data">120</span></li>
					<li><span class="at">视频币：</span><span class="data">0</span></li>
					<li><span class="at">推广币:</span><span class="data"></span></li>
							
					</ul>
					</div>
					<div style="margin-top:10px;" class="mini-box">
					<div class="t">个人签名</div>
					<div class="sign"></div>
					<form style="display:none;" id="signform" method="post" action="/space_edit?act=update_sign">
					<textarea id="sign" style="width: 97%;margin:7px 0px 4px 4px;" name="sign"></textarea>
					<button type="submit" style="margin:2px 0px 10px 4px;" class="button2">确认</button>
					</form>
					</div>
				</div>
				</div>';
			break;
		case "new":
			if(@$_GET['act'] == "ok"){
				echo "<h1>投稿成功</h1>";	
			}else{
			require_once( dirname(dirname(__FILE__)) . '/wp-load.php' );

			//echo htmlspecialchars($select);
			echo '<div class="body">
					  <style>
					#odi_list table td
					{
						padding: 5px;
						background-color:#FFF;
					}
					#odi_list table tr.head td
					{
						background-color:#EFEFEF;
					}
					#mode_basic_detail
					{
						white-space:nowrap;
					}
					</style>
					  <form onsubmit="return checkSubmit();" enctype="multipart/form-data" method="post" action="doSubmit.php" name="form1" class="mTB10 mL10 mR10">
						<input type="hidden" value="save" name="dopost">
						<div class="up-div">
						  <div class="l"><b>标题</b><span>(必填)</span></div>
						  <div class="r">
							<input type="text" onkeyup="countStrlen(\'title\', \'titleCount\', 40)" style="width:300px;" value="" maxlength="255" id="title" name="title">
							<span class="color_g"><span id="titleCount">0</span> / 40</span><br>
						  </div>
						</div>
						<div class="up-div">
						  <div class="l"><b>备注名</b><span>(选填)<br>
							可以填写原名称，用户可选择默认显示为此名</span></div>
						  <div class="r">
							<input type="text" onkeyup="countStrlen(\'subtitle\', \'subtitleCount\', 40)" style="width:300px;" value="" maxlength="255" id="subtitle" name="subtitle">
							<span class="color_g"><span id="subtitleCount">0</span> / 40</span><br>
							<span style="color:red">请勿随意填写备注名，如有发现，封号处理</span> </div>
						</div>
						<div class="up-div">
						  <div class="l"><b>标签TAG</b><span>(必填)<br>
							视频关键字，多个请用逗号分开</span></div>
						  <div class="r">
							<input type="text" style="width:300px;" value="" maxlength="255" id="tags" name="tags" autocomplete="off" class="ui-autocomplete-input" role="textbox" aria-autocomplete="list" aria-haspopup="true">
							<!--<input type="checkbox" checked="checked" value="1" name="keywords_change">
							允许其他人增加--> </div>
						</div>
						<div class="up-div">
						  <div class="l"><b>隶属栏目</b><span>(必填)</span></div>
						  <div class="r">
							<select onclick="chkTips(this.value)" onblur="chkTips(this.value)" size="1" id="typeid" name="typeid">
							  <option disabled="disabled" selected="" value="0">请选择栏目...</option>
							  <optgroup label="CG视频教程">
							  '.select('cgvideoset','').'
							  </optgroup>
							  <optgroup label="动画">
							  '.select('animationcat','').'
							  </optgroup>
							  <optgroup label="音乐">
							  '.select('musicscat','').'
							  </optgroup>
							  <optgroup label="游戏">
							  '.select('gamescat','').'
							  </optgroup>
							  <optgroup label="娱乐">
							  '.select('recreationscat','').'
							  </optgroup>
							  <optgroup label="资讯">
							  '.select('advisorycat','').'
							  </optgroup>
							</select>
							<span id="classtips"></span> </div>
						</div>
						<div class="up-div">
						  <div class="l"><b>投稿类型</b><span>(必填)</span></div>
						  <div class="r">
							<input type="radio" onclick="$(\'#div_origav\').slideUp(200)" checked="checked" id="arctype_copy" value="Copy" name="arctype">
							<label for="arctype_copy"> 转载</label>
							<input type="radio" onclick="$(\'#div_origav\').slideUp(200)" id="arctype_original" value="Original" name="arctype">
							<label for="arctype_original"> 自制</label>
							<input type="radio" onclick="$(\'#div_origav\').slideDown(200)" id="arctype_origav" value="Copy" name="arctype">
							<label for="arctype_origav"> 补档</label>
							<span style="color:red" id="classtips">非本人自制原创请勿选择自制，严重违规者将封号处理</span> </div>
						</div>
						<div style="display:none" id="div_origav" class="up-div">
						  <div class="l"><b>补档AV号</b><span>(必填)<br>
							仅对UP主自主删除视频有效</span></div>
						  <div class="r">
							<input type="text" style="width:50px;" value="" maxlength="8" name="orig_av" id="orig_av">
						  </div>
						</div>
						<div style="" class="up-div">
						  <div class="l"><b>简介</b><span>(必填)<br>
							视频的内容简介 多页相当于P1简介</span></div>
						  <div class="r">
							<textarea onkeyup="countStrlen(\'description\', \'descCount\', 200)" style="height:65px;width:380px" id="description" name="description"></textarea>
							<span class="color_g"><span id="descCount">0</span> / 200</span><br>
						  </div>
						</div>
						<div class="up-div">
						  <div class="l"><b>视频出处</b><span>(必填)<br>
							请填入SM号或其他来源/原创</span></div>
						  <div class="r">
							<input type="text" style="width:300px;" value="" maxlength="255" id="comefrom">
						  </div>
						</div>
						<div class="up-div">
						  <div class="l"><b>封面缩略图</b> <span>(分辨率120X90 JPEG或PNG)<br>
							如沒有上传将不显示视频图片</span></div>
						  <div class="r">
							<input type="file" style="width:408px" id="litpic" name="litpic" class="file">
						  </div>
						</div>
						<div class="up-div">
						  <div style="padding:3px; font-size:14px" id="editor_mode_select"> 编辑器模式:
							<input type="radio" onclick="select_Editor_Mode(this.value)" checked="checked" value="0" id="editor_mode_single" name="editor_mode">
							<label for="editor_mode_single">普通模式</label>

							<input type="radio" value="1" id="editor_mode_advance" onclick="select_Editor_Mode(this.value)" name="editor_mode">
							<label style="color:red" for="editor_mode_advance">代码模式</label>
							<br>
						  </div>
						</div>
						<div id="odi_list">
						  <table cellspacing="1" cellpadding="1" bgcolor="#999999">
							<tbody>
							  <tr class="head">
								<td nowrap="">来源</td>
								<td width="350">视频ID</td>
								<td nowrap="">操作</td>
							  </tr>
							  <tr>
								<td><select id="odi_source">
									<option value="sina">新浪</option>
									<option value="youku">优酷</option>
									<option value="qq">腾讯</option>
									<!--<option value="6cn">6间房</option>-->
								  </select></td>
								<td id="odi_link_container"><input type="text" value="" size="60" style="width:340px" id="odi_link"></td>
								<td><input type="button" onclick="addNew()" id="btn_basic_add" value=" 添加 "></td>
							  </tr>
							</tbody>
						  </table>
						</div><input id="auto_action" type="hidden" value="Add_new" name="auto_action">
						<div class="up-div">
						  <div style="display:none" id="mode_advance">
							<p style="color:red">↓↓↓↓↓↓投稿代码请放到下面↓↓↓↓↓↓</p>
							<textarea name="body" style="border:2px thin #CCC; width:500px; height:280px" id="body"></textarea>
							<br>
							<!--<input type="button" value="可点此使用转换器转换" style="font-size:14px;padding:5px" onclick="window.open(\'http://my-acg.com/bilibili.htm\')">-->
							<span style="font-size:16px; color:blue"><!--或-->
							<input type="button" value="点这里查看投稿范例" style="font-size:14px;padding:5px" onclick="if ($(\'#manual_post_help:visible\').length){ $(\'#manual_post_help\').hide(\'fold\'); }else{ $(\'#manual_post_help\').show(\'fold\');}">
							</span>
							<div style="display:none" id="manual_post_help">
							  <pre>
					
					新浪地址如 http://video.sina.com.cn/v/b/<font color="red">33372250</font>-1747442072.html
					则发布代码应为
					[mukio]vid=33372250[/mukio]
					
					QQ地址如 http://cgi.video.qq.com/v1/videopl?v=<font color="red">69Y7qUEoJaI</font>
					则发布代码应为
					[mukio]vid=69Y7qUEoJaI&type=qq[/mukio]
					
					优酷代码
					[mukio]vid=eerwer&type=youku[/mukio]
					
					flv等视频文件
					[mukio ]file=http://6.cn/p/WYN2dzJ07Mah92zCwYB9Tg.swf[/mukio]
					
					</pre>
							</div>
						  </div>
						</div>
						<hr>
						<br>
						<div class="up-div"> <font size="5" color="#990000" style="line-height:200%">★任何一名优秀的UP主，都应该拒绝投稿渣画质视频！★</font><br>
						  <font size="5" color="#990000" style="line-height:200%">★网站拒绝任何明文标注版权物和低俗稿件!★</font><br>
						  <h2>投稿说明</h2>
						  <font size="2" color="red">为了避免投稿视频撞车（即，视频重复）投稿前请仔细搜索有无您想投稿的视频。<br>
						  如果您的投稿视频被退回,那么说明您投稿中的相关内容不完整或投稿代码模式没有按照范例的标准进行填写。
						  
						  
						  </font> </div>
						<div class="up-div">
						  <button type="submit" class="button2">提交</button>
						  <button onclick="location.reload();" type="reset" class="button2 mL10">重置</button>
						</div>
					  </form>
					  <script language="JavaScript" src="js/member_new.js"></script>
					</div>';
			   }
			  break;
		case "fav":
			require_once( dirname(dirname(__FILE__)) . '/wp-load.php' );
			if(@$_GET['act'] == "rank"){
				echo '<div class="nav">
					   <a href="#fav">我的收藏</a>
					   <a href="#fav&amp;act=sp">专题收藏</a>
					   <a class="on" href="#fav&amp;act=rank">收藏排行</a>
					 </div>';

				echo '<div class="body"><ul class="a-z-list">'.favorite(3).'</ul></div>'; 
			 }else{
				echo '<div class="nav">
				   <a class="on" href="#fav">我的收藏</a>
				   <a href="#fav&amp;act=sp">专题收藏</a>
				   <a href="#fav&amp;act=rank">收藏排行</a>
				 </div>';

				echo '<div class="body">
						  <form id="addtoList" method="post" action="doSubmit.php">
							<ul class="a-z-list">
							'.favorite(2).'
							</ul>
							<ul class="page">
							</ul>
							<div class="clear"></div>
							
							<input type="hidden" value="delstow" name="auto_action">
							<input type="hidden" value="" name="dopost" id="dopost">
							<input type="button" onclick="$(\'.a-z-list &gt; li &gt; input[type=checkbox]\').attr(\'checked\',\'checked\')" value=" 全选 "/>
							<input type="submit" value=" 从收藏夹中删除 "/>
						  </form>
						</div>';
			}
			  break;
		case "sp":
			if(@$_GET['act'] == "new"){
				require_once( dirname(dirname(__FILE__)) . '/wp-load.php' );
				echo '<div class="nav"><a href="#sp">我的专题</a><a class="on" href="#sp&amp;act=new">创建专题</a></div><div class="body"> <script language="JavaScript" src="js/common.js"></script>
  <form enctype="multipart/form-data" method="post" action="doSubmit.php" name="form1">
    <div class="sp_post"><input id="auto_action" type="hidden" value="Add_specialt" name="auto_action"/>
      <div id="preview"> <img border="0" src="http://static.hdslb.com/images/transparent.gif" id="imghead"> </div>
      <ul>
        <li><span>专题标题:<br>
          <i class="i">(必填)</i></span>
          <div class="left">
            <input type="text" value="" style="width:300px;" name="title" id="sp_title" autocomplete="off" class="ui-autocomplete-input" role="textbox" aria-autocomplete="list" aria-haspopup="true">
            <div class="info"></div>
          </div>
        </li>
        <li><span>同义词<br>
          <i>(选填)</i></span>
          <div class="left">
            <input type="text" style="width:300px;" name="sp_alias" id="sp_alias">
            <i>用半角逗号(,)分隔</i><i id="sp_alias_msg"></i>
            <div style="color:red" class="info">请勿随意填写同义词,凡带有不标准含义或者无意义同义词均不予通过,我们将严格审查,恶意填写将被封停处理!</div>
          </div>
        </li>
        <li> <span>缩略图:</span>
          <div class="left">
            <input type="file" onchange="previewImage(this)" style="width:300px;" name="img" id="imgup">
            <i>(分辨率128x128)</i></div>
        </li>
        <li> <span>类型:</span>
          <div class="left types">
            <input type="hidden" name="is_bangumi" id="is_bangumi" value="0">
            <a id="btn_normal" class="on">普通</a><a id="btn_bangumi" href="javascript:bangumi();">番剧</a></div>
        </li>
        <li style="display:none" id="bangumi_person_layer"><span style="float:left">声优：</span>
          <div class="left">
            <input type="text" placeholder="声优，以半角逗号间隔，可输入全拼或拼音首字母搜索" value="" size="50" name="person" id="person" autocomplete="off" class="ui-autocomplete-input" role="textbox" aria-autocomplete="list" aria-haspopup="true">
          </div>
        </li>
        <li style="display:none" id="bangumi_area_layer"><span style="float:left">地区：</span>
          <div class="left">
            <select name="areaid">
              <option value="1">中国大陆</option>
              <option value="2">日本</option>
              <option value="3">美国</option>
              <option value="4">英国</option>
              <option value="5">加拿大</option>
              <option value="6">中国香港</option>
              <option value="7">中国台湾</option>
              <option value="8">韩国</option>
              <option value="9">法国</option>
              <option value="10">泰国</option>
              <option value="11">马来西亚</option>
              <option value="12">新加坡</option>
              <option value="13">西班牙</option>
              <option value="14">俄罗斯</option>
              <option value="15">德国</option>
              <option value="16">其他</option>
            </select>
          </div>
        </li>
        <li style="display:none" id="bangumi_version_layer"><span style="float:left">版本：</span>
          <div class="left">
            <select name="typeid">
              <option selected="selected" value="0">其他</option>
              <option value="1">TV版</option>
              <option value="2">OVA版</option>
              <option value="3">剧场版</option>
              <option value="4">OAD版</option>
            </select>
          </div>
        </li>
        <li style="display:none" id="bangumi_style_layer"> <span>番剧风格</span>
          <div class="left styles"> '.terms_list().' </div>
        </li>
        <li style="display:none" id="bangumi_date_layer"> <span>番剧播出时间:</span>
          <div class="left">
            <input type="text" value="" name="bangumi_date" id="bangumi_date" onclick="$(this).datepicker();" >
          </div>
        </li>
        <li><span>专题介绍:<br>
          <i>1000字以内</i></span>
          <div class="left">
            <textarea name="description" id="description"></textarea>
          </div>
        </li>
      </ul>
      <input type="hidden" value="" id="id_styleid" name="styleid">
      <div class="cnt">
        <input type="hidden" value="" name="spid">
        <input type="submit" value="提交" class="dbutton">
      </div>
    </div>
  </form>
</div>';
				
			}elseif(@$_GET['act'] == "edit" && $_GET['spid']){
				require_once( dirname(dirname(__FILE__)) . '/wp-load.php' );
				echo editSpecialt($_GET['spid']);	
			}elseif(@$_GET['act'] == "ok"){
				echo "<h1>专题创建成功</h1>";	
			}else{
				require_once( dirname(dirname(__FILE__)) . '/wp-load.php' );
				echo '<div style="display:none" title="退回原因" id="dialog-modal">
					  <p id="dialog-modal-reason" style="text-align:left"></p>
					</div>
					<div class="nav"><a class="on" href="#sp">我的专题</a><a href="#sp&amp;act=new">创建专题</a></div>
					<div class="body">
					  <ul class="a-z-list">
					  '.specialt_list().'
					  </ul>
					  <ul class="page">
					  </ul>
					</div>';
			 }
			  break;
		case "friend":
			echo'<iframe id="pmframe" name="pmframe"  src="friend.php" frameborder="0" height="600" width="100%"></iframe>';;
			  break;
		case "msg":
			echo'<iframe id="pmframe" name="pmframe"  src="msn.php" frameborder="0" height="600" width="100%"></iframe>';
			  break;
		case "profile":
			echo "profile";
			  break;
		case "space_edit":
			echo "space_edit";
			  break;
		case "video":
			require_once( dirname(dirname(__FILE__)) . '/wp-load.php' );
			if(@$_GET['act'] == "edit" && $_GET['aid']){
				show_post($_GET['aid']);				
			}elseif(@$_GET['act'] == "del"){
				wp_delete_post($_GET['aid']);
				echo  "删除成功！";
			}else{
				echo '<div class="nav">
						<a class="on" href="#video">我的投稿</a>
	<!--					<a href="#video&amp;lock=1">锁定视频列表</a>
						<a href="#video&amp;act=report">弹幕举报管理</a>
						<a href="#video&amp;act=filter">全局过滤管理</a>
						<a href="#video&amp;act=advcmt">高级弹幕请求</a>
	-->				</div>
					<div class="body"><ul class="a-z-list"> '.video().'</ul>
					</div>';
			}
			  break;	
	}

?>